
function addPicture(){
   console.log("click...");
  return $.ajax({
    type: 'GET',
    url: '/resources/add/',
    async: false
  }).responseText;
}

$(document).ready(function(){
  $('#addoccurrence').click( function( e ) {
    e.preventDefault();
    $('form').append( addPicture());
  });
});